package com.railway.news.util;

import java.io.File;

import org.apache.struts2.ServletActionContext;

public class NewsCfgManager {

   public static String getNewsPubDir(){
	   //此处的newscontent,后期可以从配置文件读取
	   if( news_pub_dir == null){
		String savePath = ServletActionContext.getServletContext().getRealPath(""); //获取项目根路径 
		news_pub_dir = savePath +File.separator+ "newscontent"+File.separator;
	   }
	   return news_pub_dir;
   }
   private static String news_pub_dir = null;
}
